package cn.gson.crm.controller.job;

import java.util.List;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.gson.crm.controller.BaseServlet;
import cn.gson.crm.model.dao.EmploDao;
import cn.gson.crm.model.dao.JobFollowDao;
import cn.gson.crm.model.dao.StudentDao;
import cn.gson.crm.model.entity.Student;
import cn.gson.crm.model.po.JobFollowPo;

@WebServlet("/student/employed")
public class EmployedStudentSDetailServlet extends BaseServlet{
	/**
	 * 获取面试中学生的详细信息
	 */
	private static final long serialVersionUID = 1L;
	StudentDao stuDao = new StudentDao();
	JobFollowDao jobDao = new JobFollowDao();
		@Override
		protected void get(HttpServletRequest request, HttpServletResponse response) throws Exception {
			String id= request.getParameter("id");
			Student stuDetail = stuDao.getStudentById("正常", "已分配", Integer.parseInt(id));
			String counselorName = new EmploDao().emploGetById("正常", stuDetail.getCounselorId()).getUserName();
			JobFollowPo jobFollowPo = jobDao.getJobFollowByStuId1(id);
			request.setAttribute("stuDetail", stuDetail);
			request.setAttribute("counselorName", counselorName);
			request.setAttribute("jobFollowPo", jobFollowPo);
			getServletPathAndForward(request, "student/employed_stu_detail.jsp");
		}
}
